using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Hr;
using FytSoa.Domain.Sys;
using SqlSugar;

namespace FytSoa.Domain.Crm;

/// <summary>
/// 工单回访
/// </summary>
[SugarTable("crm_wocorder_visit")]
public class CrmWocOrderVisit:Entity
{
    /// <summary>
    /// 用户编号
    /// </summary>
    [Required]
    public long UserId { get; set; }
    
    /// <summary>
    /// 用户
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(UserId))]
    public HrEmployee UserObj { get; set; }
    
    /// <summary>
    /// 工单编号
    /// </summary>
    [Required]
    public long OrderId { get; set; } = 0;
    
    /// <summary>
    /// 工单
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(OrderId))]
    public CrmWocOrder OrderObj { get; set; }

    /// <summary>
    /// 业务水平编号
    /// </summary>
    [Required]
    public long LevelId { get; set; }
    
    /// <summary>
    /// 业务水平
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(LevelId))]
    public SysCode LevelObj { get; set; }

    /// <summary>
    /// 工作效率编号
    /// </summary>
    [Required]
    public long EfficiencyId { get; set; }
    
    /// <summary>
    /// 工作效率
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(EfficiencyId))]
    public SysCode EfficiencyObj { get; set; }

    /// <summary>
    /// 服务态度编号
    /// </summary>
    [Required]
    public long ServiceAttitudeId { get; set; }
    
    /// <summary>
    /// 服务态度
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(ServiceAttitudeId))]
    public SysCode ServiceAttitudeObj { get; set; }

    /// <summary>
    /// 满意度编号
    /// </summary>
    [Required]
    public long SatisfactionId { get; set; }
    
    /// <summary>
    /// 满意度
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(SatisfactionId))]
    public SysCode SatisfactionObj { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Summary { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }


}